Improve which-key--process-define-key-args
authorJustin Burkett <justin@burkett.cc>
Fri, 15 Dec 2017 19:18:30 +0000 (14:18 -0500)
committerJustin Burkett <justin@burkett.cc>
Fri, 15 Dec 2017 19:18:30 +0000 (14:18 -0500)
Specify Prefix Command as an explicit match string to cut down on false
positives.

which-key.el

index fdef15b424cbb851a3bfe67b84c91d68a948e513..1523c00382c834b92da0630082c4be16d08ce52d 100644 (file)
@@ -919,8 +919,9 @@ as :before advice for `define-key'."
                (symbolp (cdr def)))
       (let ((key-desc (regexp-quote (key-description key))))
         (push (cons (cons (format "%s\\'" key-desc)
-                          (when (cdr def)
-                            (format "\\`%s\\'" (symbol-name (cdr def)))))
+                          (format "\\`%s\\'" (if (cdr def)
+                                                 (symbol-name (cdr def))
+                                               "Prefix Command")))
                     (cons nil (car def)))
               which-key-replacement-alist)))))